import { Directive, HostBinding } from '@angular/core';

@Directive({
    selector: '[ngModel]'
})

export class HostDirective {
    constructor(public control: NgModel) {
    }
    @HostBinding('class.valid') get valid() {
        return this.control.valid;
    }
    @HostBinding('class.invalid') get invalid() {
        return this.control.invalid;
    }
}
